<?php
include_once($_SERVER['DOCUMENT_ROOT']."/RecJP/inc/session_start.php");
//session开始之前设定session;
require($_SERVER['DOCUMENT_ROOT'] . "/RecJP/inc/session_config.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/RecJP/class/class.AuthHelper.php");
$auth = new AuthHelper();

/*
  if(!isset($_SESSION['logged_in']))
  {
  $auth->LoginFailed();
  }
*/

if (!isset($_SESSION['userid']) || empty($_SESSION['userid'])) {
    $auth->LoginFailed();
} else {
    $logged_in = $auth->checkSession();

    if (!$logged_in) {
        $auth->logout();
    } else {
        //验证通过
    }
}